﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace BooksOnline.Controllers
{
    public class ApplicationMenuController : Controller
    {
        public PartialViewResult Menu()
        {
            // Give a call to database to fetch current user

            if (Convert.ToBoolean(System.Web.HttpContext.Current.Session["IsAdmin"]))
                return PartialView("AdminMenu");
            
            return PartialView("UserMenu");
        }
    }
}
